/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef PAGMATRIX_H
#define PAGMATRIX_H
#include "napi/native_api.h"
#include <string>
namespace NativeXComponentSample {
    class PAGMatrix {
    public:
        explicit PAGMatrix(napi_env pEnv);
        PAGMatrix(napi_env pEnv, napi_ref pRef);
        ~PAGMatrix();
        static napi_value JsMatrixConstructor(napi_env env, napi_callback_info info);
        static void Destructor(napi_env env, void *nativeObject, void *finalize); // 释放资源的函数(类似类的析构函数)
        static napi_ref sJSMatrixConstructor_;                                    // 生命周期变量
        static napi_value Setvalues(napi_env env, napi_callback_info info);
    
        static napi_value GetScaleX(napi_env env, napi_callback_info info);
        static napi_value GetScaleY(napi_env env, napi_callback_info info);
        static napi_value GetSkewX(napi_env env, napi_callback_info info);
        static napi_value GetSkewY(napi_env env, napi_callback_info info);
        static napi_value GetTranslateX(napi_env env, napi_callback_info info);
        static napi_value GetTranslateY(napi_env env, napi_callback_info info);

    private:
        static std::string _msg; // 设置和获取数据的变量
        napi_env mEnv = nullptr; // 记录环境变量
        napi_ref mRef = nullptr; // 记录生命周期变量
    };

} // namespace NativeXComponentSample
#endif